import React from 'react'
import {HashRouter, Route, Redirect, Switch} from "react-router-dom";
import NowPlaying from "./film/NowPlaying";
import Comingsoon from "./film/Comingsoon";

export default function Films() {
    return (
        <div>
            Films
            <Switch>
                {/*路由配置,路由嵌套*/}
                <Route path="/films/nowPlaying" component={NowPlaying}></Route>
                <Route path="/films/comingsoon" component={Comingsoon}></Route>
                <Redirect from="/films" to="/films/nowPlaying" exact></Redirect>
            </Switch>
        </div>
    )
}
